<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja" id="main">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Tilemap Class</title>
	<link rel="stylesheet" href="../inc/css/style.min.css" />
	<script type="text/javascript" src="../inc/js/lib/jquery-1.11.1.min.js"></script>
	<script type="text/javascript" src="../inc/js/common.js"></script>
</head>
<body>

	<div class="main">

		<h1 class="main__title--h1 main__title--h1--v07">Tilemap Class</h1>
		<ul class="breadcrumb">
			<li>JSライブラリ</li>
			<li>&gt;</li>
			<li>Tilemap Class</li>
		</ul>
		<p>The tilemap which displays 2D tile-based game map.</p>
		<div class="main__section">
			<h2 class="main__title--h2">Constructor</h2>
<pre class="main__pre--code">
Tilemap ()
</pre>
		</div><!-- /main__section -->


		<div class="main__section">
			<h2 class="main__title--h2">Item Index</h2>
			<b>Methods</b>
			<ul class="main__ul--inline">
				<li><a href="#m01">addChild</a></li>
				<li><a href="#m02">addChildAt</a></li>
				<li><a href="#m03">isReady</a></li>
				<li><a href="#m04">refresh</a></li>
				<li><a href="#m05">removeChild</a></li>
				<li><a href="#m06">removeChildAt</a></li>
				<li><a href="#m07">setData</a></li>
				<li><a href="#m08">update</a></li>
			</ul>

			<b>Properties</b>
			<ul class="main__ul--inline">
				<li><a href="#p01">animationCount</a></li>
				<li><a href="#p02">bitmaps</a></li>
				<li><a href="#p03">children</a></li>
				<li><a href="#p04">flags</a></li>
				<li><a href="#p05">height</a></li>
				<li><a href="#p06">horizontalWrap</a></li>
				<li><a href="#p07">origin</a></li>
				<li><a href="#p08">parent</a></li>
				<li><a href="#p09">tileHeight</a></li>
				<li><a href="#p10">tileWidth</a></li>
				<li><a href="#p11">verticalWrap</a></li>
				<li><a href="#p12">width</a></li>
			</ul>
		</div><!-- /main__section -->


		<div class="main__section">
			<h2 class="main__title--h2">Methods</h2>


			<div id="m01" class="main__subsection">
<pre class="main__pre--code">
addChild ( child ) <span class="pre__type">Object</span>
</pre>
				<p class="mb10px">Adds a child to the container.</p>
				<div class="params">
				<h4>Parameters:</h4>
				<ul class="params-list">
					<li class="param">
						<code class="param-name">child</code>
						<span class="type">Object</span>
						<div class="param-description">
							<p>The child to add</p>
						</div>
					</li>
				</ul>
					<h4>Returns:</h4>
					<p><span class="pre__type">Object:</span><br />
					The child that was added</p>
				</div>
			</div><!-- /div -->

			<div id="m02" class="main__subsection">
<pre class="main__pre--code">
addChildAt ( child  index ) <span class="pre__type">Object</span>
</pre>
				<p class="mb10px">Adds a child to the container at a specified index.</p>
				<div class="params">
				<h4>Parameters:</h4>
				<ul class="params-list">
					<li class="param">
						<code class="param-name">child</code>
						<span class="type">Object</span>
						<div class="param-description">
							<p>The child to add</p>
						</div>
					</li>
					<li class="param">
						<code class="param-name">index</code>
						<span class="type">Number</span>
						<div class="param-description">
							<p>The index to place the child in</p>
						</div>
					</li>
				</ul>
					<h4>Returns:</h4>
					<p><span class="pre__type">Object:</span><br />
					The child that was added</p>
				</div>
			</div><!-- /div -->

			<div id="m03" class="main__subsection">
<pre class="main__pre--code">
isReady () <span class="pre__type">Boolean</span>
</pre>
				<p class="mb10px">Checks whether the tileset is ready to render.</p>
				<div class="params">
					<h4>Returns:</h4>
					<p><span class="pre__type">Boolean:</span><br />
					True if the tilemap is ready</p>
				</div>
			</div><!-- /div -->

			<div id="m04" class="main__subsection">
<pre class="main__pre--code">
refresh ()
</pre>
				<p class="mb10px">Forces to repaint the entire tilemap.</p>
			</div><!-- /div -->

			<div id="m05" class="main__subsection">
<pre class="main__pre--code">
removeChild ( child ) <span class="pre__type">Object</span>
</pre>
				<p class="mb10px">Removes a child from the container.</p>
				<div class="params">
				<h4>Parameters:</h4>
				<ul class="params-list">
					<li class="param">
						<code class="param-name">child</code>
						<span class="type">Object</span>
						<div class="param-description">
							<p>The child to remove</p>
						</div>
					</li>
				</ul>
					<h4>Returns:</h4>
					<p><span class="pre__type">Object:</span><br />
					The child that was removed</p>
				</div>
			</div><!-- /div -->

			<div id="m06" class="main__subsection">
<pre class="main__pre--code">
removeChildAt ( index ) <span class="pre__type">Object</span>
</pre>
				<p class="mb10px">Removes a child from the specified index position.</p>
				<div class="params">
				<h4>Parameters:</h4>
				<ul class="params-list">
					<li class="param">
						<code class="param-name">index</code>
						<span class="type">Number</span>
						<div class="param-description">
							<p>The index to get the child from</p>
						</div>
					</li>
				</ul>
					<h4>Returns:</h4>
					<p><span class="pre__type">Object:</span><br />
					The child that was removed</p>
				</div>
			</div><!-- /div -->

			<div id="m07" class="main__subsection">
<pre class="main__pre--code">
setData ( width  height  data )
</pre>
				<p class="mb10px">Sets the tilemap data.</p>
				<div class="params">
					<h4>Parameters:</h4>
					<ul class="params-list">
						<li class="param">
							<code class="param-name">width</code>
							<span class="type">Number</span>
							<div class="param-description">
								<p>The width of the map in number of tiles</p>
							</div>
						</li>
						<li class="param">
							<code class="param-name">height</code>
							<span class="type">Number</span>
							<div class="param-description">
								<p>The height of the map in number of tiles</p>
							</div>
						</li>
						<li class="param">
							<code class="param-name">data</code>
							<span class="type">Array</span>
							<div class="param-description">
								<p>The one dimensional array for the map data</p>
							</div>
						</li>
					</ul>
				</div>
			</div><!-- /div -->

			<div id="m08" class="main__subsection">
<pre class="main__pre--code">
update ()
</pre>
				<p class="mb10px">Updates the tilemap for each frame.</p>
			</div><!-- /div -->



		</div><!-- /main__section -->


		<div class="main__section">
			<h2 class="main__title--h2">Properties</h2>

			<div id="p01" class="main__subsection">
<pre class="main__pre--code">
animationCount <span class="pre__type">Number</span>
</pre>
				<p class="mb10px">The animation count for autotiles.</p>
			</div><!-- /div -->

			<div id="p02" class="main__subsection">
<pre class="main__pre--code">
bitmaps <span class="pre__type">Array</span>
</pre>
				<p class="mb10px">The bitmaps used as a tileset.</p>
			</div><!-- /div -->

			<div id="p03" class="main__subsection">
<pre class="main__pre--code">
children <span class="pre__type">Array</span>
</pre>
				<p class="mb10px">[read-only] The array of children of the sprite.</p>
			</div><!-- /div -->
		</div><!-- /main__section -->

			<div id="p04" class="main__subsection">
<pre class="main__pre--code">
flags <span class="pre__type">Array</span>
</pre>
				<p class="mb10px">The tileset flags.</p>
			</div><!-- /div -->

			<div id="p05" class="main__subsection">
<pre class="main__pre--code">
height <span class="pre__type">Number</span>
</pre>
				<p class="mb10px">The height of the screen in pixels.</p>
			</div><!-- /div -->

			<div id="p06" class="main__subsection">
<pre class="main__pre--code">
horizontalWrap <span class="pre__type">Boolean</span>
</pre>
				<p class="mb10px">Whether the tilemap loops horizontal.</p>
			</div><!-- /div -->

			<div id="p07" class="main__subsection">
<pre class="main__pre--code">
origin <span class="pre__type">Point</span>
</pre>
				<p class="mb10px">The origin point of the tilemap for scrolling.</p>
			</div><!-- /div -->

			<div id="p08" class="main__subsection">
<pre class="main__pre--code">
parent <span class="pre__type">Object</span>
</pre>
				<p class="mb10px">[read-only] The object that contains the tilemap.</p>
			</div><!-- /div -->

			<div id="p09" class="main__subsection">
<pre class="main__pre--code">
tileHeight <span class="pre__type">Number</span>
</pre>
				<p class="mb10px">The height of a tile in pixels.</p>
			</div><!-- /div -->

			<div id="p10" class="main__subsection">
<pre class="main__pre--code">
tileWidth <span class="pre__type">Number</span>
</pre>
				<p class="mb10px">The width of a tile in pixels.</p>
			</div><!-- /div -->

			<div id="p11" class="main__subsection">
<pre class="main__pre--code">
verticalWrap <span class="pre__type">Boolean</span>
</pre>
				<p class="mb10px">Whether the tilemap loops vertical.</p>
			</div><!-- /div -->

			<div id="p12" class="main__subsection">
<pre class="main__pre--code">
width <span class="pre__type">Number</span>
</pre>
				<p class="mb10px">The width of the screen in pixels.</p>
			</div><!-- /div -->


		</div><!-- /main__section -->


	</div><!-- /main -->

</body>
</html>